<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  var person1 ={
    "name":"张三",
    "age":18,
    "sex":"男",
    "say":function(){

    }
  };
  var person2 ={
    "name":"李四",
    "age":19,
    "wife":{
      "name":"王五",
      "age":20,
      "sex":"女"
    }
  }
  var person3 ={
    "name":"王五",
    "age":20,
    "wife":{
      "name":"赵六",
      "age":21,
      "sex":"女",
      "sons":[
              {
                "name":"赵六子",
                "age":4,
                "sex":"男"},
              {"name":"赵六二子",
                "age":3,
                "sex":"男"}
      ]
    }
  }
  var jsonObj = {"姓名" :"张三", "年龄" :18}
  var jsonStr = JSON.stringify(jsonObj);
  console.log(typeof jsonObj);
  console.log(typeof jsonStr);

  jsonObj = JSON.parse(jsonStr);
  console.log(jsonObj);
</script>
</body>
</html>